namespace Brjnk.GpxExplorer.Workspace.GCBrowser
{
    using System.ComponentModel;

    /// <summary>
    /// </summary>
    public class ImportAllItem : INotifyPropertyChanged
    {
        private Geocache geocache;

        private ImportType type;

        public ImportAllItem(Geocache geocache, ImportType type)
        {
            this.geocache = geocache;
            this.type = type;
        }

        private bool isSelected = true;

        public bool IsSelected
        {
            get { return isSelected; }
            set { isSelected = value; OnPropertyChanged("IsSelected"); }
        }

        public ImportType Type { get { return type; } }

        public Geocache Geocache { get { return geocache; } }

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }

    public enum ImportType
    {
        Import,
        Update
    }
}